package com.jincp.filepicker.base;

/**
 * =========================================================
 * @ProjectName:
 * @ClassName: BasePickerBuilder
 * @Description:
 * @Author: jincp
 * @CreateDate: 2019/3/25 19:36
 * =========================================================
 */
public abstract class BasePickerBuilder<T extends BasePickerBuilder, P extends  BasePickerManager> {

    protected boolean isMultiMode = false;    //图片选择模式
    protected int maxSelectedLimit = 9;         //最大选择图片数量

    protected int currentDirectoryIndex = 0;  //当前选中的文件夹位置 0表示所有图片

    public T setMultiMode(boolean multiMode) {
        this.isMultiMode = multiMode;
        return (T)this;
    }

    public T setMaxSelectedLimit(int maxSelectedLimit) {
        this.maxSelectedLimit = maxSelectedLimit;
        return (T)this;
    }

    public boolean isMultiMode() {
        return isMultiMode;
    }

    public int getMaxSelectedLimit() {
        return maxSelectedLimit;
    }

    protected abstract P build();
}